package com.mtao.impl;

import com.mtao.ArticleCategoryService;
import com.mtao.mapper.ArticleCategoryMapper;
import com.mtao.entity.ArticleCategory;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
@Service
public class ArticleCategoryServiceImpl implements ArticleCategoryService {
    @Resource
    private ArticleCategoryMapper articleCategoryMapper;

    /**
     * 新增文章分类
     * @param articleCategory
     */
    @Override
    public void add(ArticleCategory articleCategory) {
        articleCategory.setCreateTime(LocalDateTime.now());
        articleCategory.setUpdateTime(LocalDateTime.now());
        articleCategory.setCreateUser(Integer.valueOf(7));
        articleCategoryMapper.update(articleCategory);

    }

    /**
     * 修改文章分类
     * @param articleCategory
     */
    @Override
    public void update(ArticleCategory articleCategory) {

    }
}
